package com.jeeplus.mob.web;

import com.jeeplus.common.json.AjaxJson;
import com.jeeplus.mob.service.AgreementService;
import org.springframework.web.bind.annotation.RequestMethod;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/mob/agreement")
@Api(tags = "协议内容")
public class AgreementController {

    @Autowired
    private AgreementService agreementService;

    /**
     * 获取协议内容
     * @param agreementType:协议类型（1：用户协议，2：隐私协议）
     * @return
     */
    @RequestMapping(value = "getAgreementInfo",method = RequestMethod.GET)
    @ApiOperation(value = "协议内容获取")
    public AjaxJson getAgreementInfo (@RequestParam(value = "type") String agreementType) {
        return agreementService.getAgreementInfo(agreementType);
    }
}
